<template>
<h1>下拉选框组件</h1>
  <el-select placeholder="请选择要去的城市"
             style="width: 50%;" v-model="city">
    <el-option label="上海" value="sh"></el-option>
    <el-option label="北京" value="bj"></el-option>
    <el-option label="广州" value="gz"></el-option>
    <el-option label="深圳" value="sz"></el-option>
    <el-option label="杭州" value="hz"></el-option>
    <el-option label="南京" value="nj"></el-option>
    <el-option label="苏州" value="sz"></el-option>
    <el-option label="西安" value="xa"></el-option>
    <el-option label="武汉" value="wh"></el-option>
    <el-option label="成都" value="cd"></el-option>
  </el-select>
  <h4>她想去的城市为{{city}}</h4>
</template>
<script setup>
import {ref} from "vue";

const city = ref('');
</script>


<style scoped>

</style>